package com.bnzj.core.persistence.query;

import java.util.Map;

/**
 * 简单表达式接口，参考Expression&Predicate设计
 * 
 * @author barry
 * @date 2019-09-29
 * @see javax.persistence.criteria.Expression
 * @see javax.persistence.criteria.Predicate
 */
public interface IExpression {
    default BooleanOperator getOperator() {
        return BooleanOperator.and;
    }
    default boolean isNegated() {
        return false;
    }

    IExpression and(IExpression... expressions);

    IExpression or(IExpression... expressions);

    IExpression not();

    String buildSQL(Map<String, Object> paramsMap);
}
